When Tetris Max is launched, it looks for a file named "Tetris Max Music" in the same folder as the application, and loads the background music from that file. You can have Tetris Max play different music simply by putting a new "Tetris Max Music" file in the folder and moving/renaming the old one. You can also create your own music files if you have a hankering to do that sort of thing. Here's how.
Get ahold of some music, something that won't grate on your nerves after 2 minutes of listening. Break it up into segments, such that the entire piece of music can be played by playing segments in the appropriate order. If there is a section of the music that plays more than once, you can save memory by making it a single segment and playing it several times.
Using ResEdit, create a new ResEdit document. Change its creator to "log_" and its type to "tMUS". Add your music segments to the document as snd resources.
To play your music, you need to tell Tetris Max in what order your segments should be played. When Tetris Max reaches the end of the order you've specified, it starts over at the point in the order where it finds the first occurrence of the snd resouce named "repeat". If no such resource exists, it starts over at the beginning of the order.
For example, say you have four music segments (snd resources) named SegA, SegB, SegC, and SegD. Let's say that to play your music, you need to play them in this order:
Then you would rename SegB to repeat, and give Tetris Max the order:
SegA repeat repeat SegC SegD
The order is specified in STR# resource 128. The name of the first segment to play goes at index 1, the second at index 2, etc. See one of the music files included with Tetris Max for an example.
You can put a description of your music, such as title, author, etc, in STR# resource 129, index 1. This string will be displayed whenever the user selects the "about background music" option from the apple menu.
Things to watch out for:
* The snd resources must all be format 1 resources.
* If the snd resources are marked "locked" in the music file, you may need to increase Tetris Max's application memory size, depending on how large the snd resources are. If things are crashing inexplicably or the music turns to noise, try increasing the memory allocated to the program.
* If the snd resources are marked "purgeable", the program will attempt to dynamically load them as they are needed. This makes it possible to use a large number of snd resources without needing to increase the application memory size. However, marking the resouces "purgeable" can result in audible delays between music segments as the next segment is loaded from disk.
* I've had problems with the music when the snd resources are neither "locked" nor "purgeable", so proceed at your own risk if you try this.